import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about/:id',
    name: 'About',
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
    // children: [
    //   { path: 'text', name: 'text', component: () => import('../components/text.vue') },
    //   { path: 'list', name: 'list', component: () => import('../components/list.vue') },
    //   { path: 'listinfo', name: 'listinfo', component: () => import('../components/listInfo.vue') }
    // ]
  },
]

const router = new VueRouter({
  routes
})

export default router
